-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[sdk/gen] Avoid generating Result types for functions with empty outputs #11596
[sdk/gen] Avoid generating Result types for functions with empty outputs #11596
Conversation
Changelog[uncommitted] (2022-12-09)Bug Fixes
|
pkg/codegen/testing/test/testdata/output-funcs/python/pulumi_mypkg/func_with_empty_outputs.py
Outdated
Show resolved
Hide resolved
pkg/codegen/testing/test/testdata/output-funcs/nodejs/funcWithEmptyOutputs.ts
Show resolved
Hide resolved
pkg/codegen/testing/test/testdata/output-funcs/go/mypkg/funcWithEmptyOutputs.go
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Except for #11596 (comment), my questions have been answered. LGTM!
98068fb
to
b0b4add
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is good to merge.
from . import _utilities | ||
|
||
__all__ = [ | ||
'func_with_const_input', | ||
] | ||
|
||
def func_with_const_input(plain_input: Optional[str] = None, | ||
opts: Optional[pulumi.InvokeOptions] = None): | ||
opts: Optional[pulumi.InvokeOptions] = None) -> Awaitable[None]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't return anything, so I guess None
coerces to Awaitable[None]
.
bors merge |
Build succeeded: |
Void results don't get Result types anymore (pulumi/pulumi#11596)
Bumps [github.com/pulumi/pulumi/pkg/v3](https://github.com/pulumi/pulumi) from 3.49.0 to 3.54.0. To account for changes since 3.49: - Skips two more codegen tests. These were added recently (pulumi/pulumi#11996 and pulumi/pulumi#11893) and the Java SDK does not pass these yet. - Update generated code—a function without a result doesn't get a Result type anymore (pulumi/pulumi#11596).
Description
Part of #11418 where we shouldn't generate result types for function invokes that have no properties.
This is a separate PR to showcase the exact changes required to improve the situation and reduce the diff from #11418
Checklist
make changelog
and committed thechangelog/pending/<file>
documenting my change